package com.xyht.medicine_management_system.modules.order.entity.resp;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xyht.medicine_management_system.modules.addresses.entity.MmsAddresses;
import com.xyht.medicine_management_system.modules.consumptionPoint.entity.MmsConsumptionPointRecord;
import com.xyht.medicine_management_system.modules.coupon.entity.resp.MmsUserCouponRelationResp;
import com.xyht.medicine_management_system.modules.order.entity.MmsOrderSchedule;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author XYHT
 * @since 2023-12-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("mms_order")
@ApiModel(value="MmsOrder对象", description="订单表")
public class MmsOrderResp implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单ID")
    private String id;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "药品信息")
    private List<OrderMedicineInfoResp> medicineInfo;

    @ApiModelProperty(value = "订单状态(0.订单取消 1.待支付 2.待发货 3.待收货 4.已收货)")
    private Integer orderStatus;

    @ApiModelProperty(value = "是否有售后")
    private Boolean isRefund;

    @ApiModelProperty(value = "是否售后中")
    private Boolean isRefunding;

    @ApiModelProperty(value = "售后信息集合")
    private List<MmsOrderRefundResp> orderRefundInfoList;

    @ApiModelProperty(value = "订单是否结束")
    private Boolean isClose;

    @ApiModelProperty(value = "分账完结时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date profitSharingTime;

    @ApiModelProperty(value = "配送地址信息")
    private MmsAddresses addressInfo;

    @ApiModelProperty(value = "订单总金额，包括商品价格、运费等")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "优惠信息")
    private MmsUserCouponRelationResp couponInfo;

    @ApiModelProperty(value = "预支付id")
    private String prepayId;

    @ApiModelProperty(value = "支付金额")
    private BigDecimal paymentAmount;

    @ApiModelProperty(value = "支付方式")
    private String paymentMethod;

    @ApiModelProperty(value = "支付时间")
    private Date paymentTime;

    @ApiModelProperty(value = "订单备注信息")
    private String notes;

    @ApiModelProperty(value = "订单结束时间")
    private Date endTime;

    @ApiModelProperty(value = "退款记录id集合")
    private String refundIdList;

    @ApiModelProperty(value = "退款记录集合")
    private List<MmsOrderRefundResp> refundInfoList;

    @ApiModelProperty(value = "是否使用积分(默认不使用)")
    private Boolean isUsePoint;

    @ApiModelProperty(value = "消费积分记录id")
    private String pointRecordId;

    @ApiModelProperty(value = "消费积分记录")
    private MmsConsumptionPointRecord pointRecord;

    @ApiModelProperty(value = "订单类型，例如普通订单、预售订单、拼团订单等")
    private Integer type;

    @ApiModelProperty(value = "订单级别，例如普通订单、VIP订单、SVIP订单等")
    private Integer orderLevel;

    @ApiModelProperty(value = "发票信息")
    private String invoiceInfo;

    @ApiModelProperty(value = "快递公司信息")
    private String carrierInfo;

    @ApiModelProperty(value = "订单定时任务集合")
    private List<MmsOrderSchedule> orderScheduleList;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
